/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controls;

import java.io.Serializable;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import javax.faces.context.FacesContext;

/**
 *
 * @author Trong Nguyen
 */
@ManagedBean
@SessionScoped
public class NaviagtionControl implements Serializable{
    
    public void redirectToEventPage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/event/adminHomePage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    public void redirectToUserPage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/user/userPage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    public void redirectToPrizePage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/prizes/prizesPage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    public void redirectToFAQsPage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/faq/faqsPage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    public void redirectToContactPage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/contact/contactPage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    public void redirectToRegistrationPage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/registration/registrationPage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    public void redirectToWinnerPage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/winner/winnerPage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    public void redirectToCommentsPage() {       

        FacesContext context = FacesContext.getCurrentInstance();
        String path = context.getExternalContext().getRequestContextPath() + "/faces/admin/comments/commentsPage.xhtml";
        utils.Uility.redirectPage(context, null, path);
    }
    
}
